#pragma once
#include "Core.h"
#include <glm/glm.hpp>

namespace krt {

	class KRT_API Ray {
	public:
		Ray(glm::vec3 origin = glm::vec3(0.0f), glm::vec3 direct = { 0.0f,0.0f,1.0f }, float time = 0.0f);

		inline glm::vec3 PointTo(float t) const { return origin + t * direct; }

		inline float Time() const { return time; }

	public:
		glm::vec3 origin, direct;

		mutable float mint, maxt;

		float time;
	};

}
